package com.li.temperature.chart.bean;

import android.content.Context;

import com.li.temperature.chart.R;
import com.li.temperature.chart.util.Config;

public class T2FileNode extends FileNode {

    public T2FileNode(Context mContext) {
        super(mContext);
        name = Config.T2;
        path = Config.T2_PATH;
        pathType = Config.T2_TYPE;
        init();
    }

    @Override
    public void formatValueInt() {
        formatTemparaturValue();
    }

    @Override
    public void formatValueStr() {
        if (type == null) {
            info = String.format("%s - %s : %.1f ", Config.T2, mContext.getString(R.string.t2_info), valueDoule);
        } else {
            info = String.format("%s - %s : %.1f ", Config.T2, type, valueDoule);
        }
    }

    @Override
    public String getResult() {
        if (isRead) {
            return info;
        } else {
            return sourceData;
        }
    }
}
